home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-1.iso / Files / System 7 / Frontier / OnLocation Frontier.sit / OnLocation Frontier / DocServer Source Text next >
Encoding:
Text File  |  1992-07-30  |  5.6 KB  |  66 lines  |  [TEXT/ttxt]

  1.  
  2. Verb    OnLocation.getIndexList
  3. Syntax    OnLocation.getIndexList(where)
  4. Parameters    where is the address of a table into which the list of OnLocation indexes will be placed. The path to this table must already exist.
  5. Action    Builds a table containing the full path name of each index known to OnLocation.
  6. Returns    The number of indexes found.
  7. Examples    OnLocation.getIndexList(@ScratchPad.Indexes)
  8.     « 16 « Puts a table containing the path to each OnLocation index at ScratchPad.Indexes
  9. Notes    All indexes known to OnLocation are returned, regardless of whether they are currently selected.
  10.  
  11. Verb    OnLocation.lookupPath
  12. Syntax    OnLocation.lookupPath(where, index, searchMode, searchString, searchAndOr)
  13. Parameters    where is the address of a table into which the path to each file found will be placed.  The path to this table must already exist.
  14. index is the full path to an OnLocation index.  If it is a null string, all indexes known to OnLocation will be searched.
  15. searchMode is the mode of the search.  The valid values for this are NameContains, NameEndsWith, NameExactly, NameStartsWith, TextExactly, and TextRoot.  If it is null, NameContains is assumed.
  16. searchString is the string to search for.
  17. searchAndOr is "And" or "Or" to indicate whether this is an "and" or an "or" search.  It is ignored unless searchMode is either TextExactly or TextRoot.
  18. Action    The specified OnLocation index is searched (or all indexes are searched) and the path name of each file matching the search criteria is placed in a table at "where".
  19. Returns    The number of files found.
  20. Examples    OnLocation.lookupPath(@ScratchPad.Answer, "", "NameContains", "DocServer", "")
  21.     « 18 « A table is built at "ScratchPad.Answer" containing the path to each file with "DocServer" in its name.  All indexes are searched.
  22. Notes    There seems to be a bug in OnLocation version 1.0 which makes some of the search modes fail to find any files.
  23. The index passed in the second parameter can be anywhere, it does not need to be one known to OnLocation.
  24. This is considerably faster than OnLocation.lookupInfo, and should be used if all that is needed is the path.
  25. A very general search will likely cause either OnLocation or Frontier to run out of memory.  Such searches should be done using OnLocation.lookupInfo.
  26. See Also    OnLocation.lookupInfo
  27.  
  28. Verb    OnLocation.lookupInfo
  29. Syntax    OnLocation.lookupPath(where, index, searchMode, searchString, searchAndOr, fileCount, timeOut, startPosition)
  30. Parameters    where is the address of a table into which information about each file found will be placed.  The path to this table must already exist.
  31. index is the full path to an OnLocation index.  If it is a null string, all indexes known to OnLocation will be searched.
  32. searchMode is the mode of the search.  The valid values for this are NameContains, NameEndsWith, NameExactly, NameStartsWith, TextExactly, and TextRoot.  If it is null, NameContains is assumed.
  33. searchString is the string to search for.
  34. searchAndOr is "And" or "Or" to indicate whether this is an "and" or an "or" search.  It is ignored unless searchMode is either TextExactly or TextRoot.
  35. fileCount is the maximum number of files to return.  If it is 0 there is no limit.
  36. timeOut is the maximum time the search may take in 60ths of a second.  If it is 0 there is no limit.
  37. startPosition is the postition in the index to start searching at, 0 means to start at the beginning.  It is ignored if the index parameter is null.
  38. Action    The specified OnLocation index is searched (or all indexes are searched) and information about each file matching the search criteria is placed in a table at "where".
  39.  
  40. The table created has three entries:
  41. where^.fileCount is the count of the number of files returned
  42. where^.endPosition is the ending position of the search.  This can be passed in the startPosition of a subsequent call to lookupInfo to continue a search that did not complete.
  43. where^.fileList is a table with one entry for each file found.  Each of these entries is in turn a table with 8 entries:
  44.  
  45. where^.filelist.filennn.path is the path to the folder containing file (ending in a colon).
  46. where^.filelist.filennn.filename is the name of the file.
  47. where^.filelist.filennn.type is the four character file type of the file.
  48. where^.filelist.filennn.creator is the four character creator ID of the file.
  49. where^.filelist.filennn.modDate is the time at which the file was last modified.
  50. where^.filelist.filennn.createData is the time at which the file was created.
  51. where^.filelist.filennn.size is the size of the file in bytes.
  52. where^.filelist.filennn.flags is a number representing the sum of the following attributes that apply to the file:
  53.  
  54. 32 if the file's text is indexed by OnLocation
  55. 16 if the file is a System 7 alias
  56. 8 if the "file" is really a folder (directory)
  57. 4 if the file is invisible to the finder
  58. Returns    The number of files found.
  59. Examples    OnLocation.lookupInfo(@ScratchPad.Answer, "", "NameContains", "DocServer", "", 0, 0, 0)
  60.     « 18 « A table is built at "ScratchPad.Answer" containing the path to each file with "DocServer" in its name.  All indexes are searched and there is no limit to the number of files returned or the time taken.
  61. Notes    There seems to be a bug in OnLocation version 1.0 which makes some of the search modes fail to find any files.
  62. The index passed in the second parameter can be anywhere, it does not need to be one known to OnLocation.
  63. If a very general search is done with no limits, you will likely cause either OnLocation or Frontier to run out of memory.  Such searches should be done in pieces using the last three parameters to control things.
  64. Because this returns more information about each file, it is quite a bit slower than OnLocation.lookupPath.
  65. See Also    OnLocation.lookupPath
  66.